package com.android.vgongyi.mapper;

import android.text.TextUtils;

import com.android.vgongyi.common.AppApiPreference;

/**
 * API REST for getting video info.
 * */
public class CommentRequest extends BaseRequest{
	
	/**
	 * mini blog item's id
	 * */
	private String itemId;
	
	/**
	 * the number of items
	 * */
	private String pageSize;
	
	public CommentRequest(String itemId,String pageSize) {
		this.itemId   = itemId;
		this.pageSize = pageSize;
	}
	
	public String executeToREST() {
		StringBuffer buffer = new StringBuffer();
		pageSize = TextUtils.isEmpty(pageSize)?"1":pageSize;
		
		//buffer.append(super.CommonHeader);
		//buffer.append("index.php?mod=comment").append(AppConstant.CHARACTER_AND);
		//buffer.append("aid").append(AppConstant.CHARACTER_EQUAL).append(itemId).append(AppConstant.CHARACTER_AND);
		//buffer.append("page").append(AppConstant.CHARACTER_EQUAL).append(pageSize);
		
		//FIXME  -  use online parameter @clouse_LJQ 
		buffer.append(String.format(AppApiPreference.LOAD_COMMENT_URL, itemId,pageSize));
		
		return buffer.toString();
	}

}
